package com.kkb.robotcustomerservice.service.impl;


import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.kkb.robotcustomerservice.dao.QuestionsDao;
import com.kkb.robotcustomerservice.entities.Questions;
import com.kkb.robotcustomerservice.service.QuestionsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author coffeeee
 */
@Service
public class QuestionsServiceImpl implements QuestionsService {

    @Autowired(required = false)
    private QuestionsDao questionsDao;

    @Override
    public Questions findById(Integer id) {
        return questionsDao.selectById(id);
    }

    @Override
    public Questions findByQuestion(String question) {
        Questions questions = new Questions();
        questions.setAnswer("嘿嘿，我不知道");
        return questions;
    }

    @Override
    public List<Questions> getQuestions() {
        return questionsDao.selectList(Wrappers.query());
    }
}
